.picker {
    background-color: #eeeeee;
    min-height:  @input-height-base;
    &:not(.picker-ready) > * {
        display: none;
    }
}
.picker-selections {
    min-height:  @input-height-base;
    color: @input-color;
    background-color: @input-bg;
    border: 1px solid @input-border;
    border-radius: @input-border-radius;
    box-shadow: @input-shadow;
    position: relative;

    .picker-focus & {
        @color-rgba: rgba(red(@input-border-focus), green(@input-border-focus), blue(@input-border-focus), .6);
        border-color: @input-border-focus;
        box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px @color-rgba;
    }

    .disabled & {
        cursor: not-allowed;
        background-color: @input-bg-disabled;
    }

    .picker-multi & {
        padding: 3px;
    }
    .picker-multi.picker-focus &:before {
        position: absolute;
        display: block;
        width: 24px;
        height: 14px;
        text-align: center;
        opacity: .4;
        bottom: 8px;
        right: 0;
        content: @icon-search;
        .icon-zenicon();
    }

    .picker-multi.picker-focus.picker-loading &::before {
        content: @icon-spinner-indicator;
        display: inline-block;
        animation: spin 2s infinite linear;
    }
}
.picker-selection {
    .picker-multi & {
        display: inline-block;
        position: relative;
        padding: 0 20px 0 5px;
        line-height: 18px;
        margin: 2px;
        background-color: @color-gray-pale;
        border-radius: @border-radius-small;
        border: 1px solid @color-gray-light;
        background-clip: padding-box;
        box-shadow: 0 0 2px #fff inset, 0 1px 0 rgba(0,0,0,.05);
    }
}
.picker-selection-single {
    padding: @padding-base-vertical 20px @padding-base-vertical @padding-small-horizontal;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    max-width: 100%;

    .picker-focus & .picker-selection-text {
        display: none;
    }
    &:after {
        position: absolute;
        display: block;
        width: 24px;
        height: 14px;
        text-align: center;
        opacity: .4;
        top: 7px;
        right: 0;
        content: @icon-caret-down;
        .icon-zenicon();
    }

    .picker-focus &::after {
        content: @icon-search;
    }

    .picker-focus.picker-loading &::after {
        content: @icon-spinner-indicator;
        display: inline-block;
        animation: spin 2s infinite linear;
    }
}
.picker-selection-remove {
    position: absolute;
    width: 18px;
    height: 18px;
    text-align: center;
    opacity: .2;
    top: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    &:before {
        content: @icon-remove;
        .icon-zenicon();
        text-shadow: @close-text-shadow;
    }
    &:hover {
        opacity: .5;
    }

    .picker-single & {
        top: 5px;
        right: 20px;
        z-index: 1;
    }
    .picker-no-value &,
    .picker-single.picker-focus & {
        display: none;
    }
}
.picker-selection-text {
    .picker-multi.picker-sortable & {
        cursor: move;
    }
}
.picker-search {
    border: none;
    background: none;
    color: transparent;
    &:focus {
        outline: none;
        color: inherit;
    }

    .disabled & {
        cursor: not-allowed;
    }

    .picker-single & {
        width: 100%;
        position: absolute;
        padding: @padding-base-vertical @padding-small-horizontal;
        left: 0;
        right: 0;
        bottom: 0;
        top: 0;
        z-index: 1;
    }
    .picker-multi & {
        display: inline-block;
        width: 10px;
        padding: 0 2px;
        margin: 2px 0;
        min-width: 10px;
        max-width: 100%;
    }
}

.picker-placeholder {
    color: @input-color-placeholder;
    position: absolute;
    top: 5px;
    left: 8px;
    right: 20px;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    display: none;
    z-index: 0;

    .picker-no-value.picker-focus & {
        display: none;
    }

    .picker-input-empty.picker-focus.picker-no-value &,
    .picker-no-value & {
        display: block;
    }
}

.picker-drop-menu {
    display: none;
    position: fixed;
    z-index: 1200;
    background-color: #fff;
    border-radius: @border-radius-base;
    box-shadow: 0 6px 12px rgba(0,0,0,.12), 0 1px 3px rgba(0,0,0,.1);
    border: 1px solid @dropdown-border;
    min-width: 100px;
    opacity: 0;
    // transition: opacity .1s linear;

    &.picker-drop-show {
        display: block;
    }
}
.picker-option-list {
    margin: 0;
    padding: 5px 0;
    overflow-y: auto;

    .picker-no-options & {
        display: none;
    }

    .picker-has-message & {

    }
}
.picker-option {
    display: block;
    padding: 5px 10px;
    clear: both;
    font-weight: normal;
    line-height: @line-height-base;
    min-height: 30px;
    color: @dropdown-link-color;
    white-space: nowrap; // prevent links from randomly breaking onto new lines
    overflow: hidden;
    text-overflow: ellipsis;
    transition: none;

    .picker-single &.picker-option-selected {
        background: @color-pale;
        color: @color-primary;
    }

    &:hover,
    &:focus {
        text-decoration: none;
    }

    .picker-single &.picker-option-selected.picker-option-active,
    &.picker-option-active {
        color: @dropdown-link-hover-color;
        background-color: @dropdown-link-hover-bg;
    }

    .picker-multi &.picker-option-selected {
        &,
        &.picker-option-active {
            color: #ccc;
            cursor: not-allowed;
            background-color: #fff;
        }
    }

    &.disabled {
        cursor: not-allowed!important;
    }
}
.picker-option-text-matched {
    position: relative;
    color: @color-primary;
    &:before {
        content: ' ';
        display: block;
        position: absolute;
        bottom: -4px;
        left: 0;
        right: 0;
        height: 2px;
        border-radius: 2px;
        opacity: .5;
        background-color: @color-primary;
    }

    .picker-option-active &,
    .picker-option:hover & {
        color: #fff;
        &:before {
            background-color: #fff;
        }
    }
}

.picker-message {
    font-size: 12px;
    color: @color-gray;
    padding: 2px 5px;
    background-color: @color-gray-pale;
    height: 22px;
    display: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    .picker-has-message & {
        display: block;
    }

    &[data-type="danger"] {
        color: @color-danger;
    }
}

.picker-actions {
    padding: 5px;
    border-top: 1px solid @dropdown-divider-bg;

    .picker-no-actions & {
        display: none;
    }

    .btn {
        padding: 2px 4px;

        &[disabled] {
            filter: grayscale(1);
            background-color: transparent;
        }
    }
    .btn + .btn {
        margin-left: 4px;
    }
}

.picker-checkable {
    .picker-option {
        padding-left: 32px;
        position: relative;
        color: inherit!important;
        cursor: pointer!important;

        > .checkbox-primary {
            position: absolute;
            left: 10px;
            top: 4px;
        }

        &.picker-option-active {
            background-color: rgba(0,0,0,.05)!important;
        }

        &:hover {
            background-color: rgba(0,0,0,.075)!important;
        }

        &.picker-option-selected {
            background-color: @color-pale!important;
        }
    }
    .picker-option-active .picker-option-text-matched,
    .picker-option:hover .picker-option-text-matched {
        color: @color-primary!important;
        &:before {
            background: @color-primary!important;
        }
    }
}
